class Fruit:
    price = 0

    def __init__(self):
        self.__color = "Red"
        self.__city = "Beijing"

    def __outputColor(self):
        print(self.__color)

    def __outputCity(self):
        print(self.__city)

    def output(self):
        self.__outputColor()
        self.__outputCity()

    @staticmethod
    def getPrice():
        return Fruit.price

    @staticmethod
    def setPrice(price):
        Fruit.price = price


# 测试
apple = Fruit()
apple.output()
print(Fruit.getPrice())
Fruit.setPrice(10)
print(Fruit.getPrice())
